
function housekeeperSelect_U(){
	var select_input = $('#select_input').val();
	if(select_input==null || select_input == ""){
		$("#select_text").children('font').remove();
		$("#select_text").append("<font color='red'>不能为空</font>");
		$("#select_input").focus();
	}else{
		$("#selectForm").submit();
	}
}

function update(id){
	$.ajax({
		url : 'zmkm_oa/housekeeper_manage/',
		dataType : 'html',
		data : ({'housekeeper_id':id}),
		success : function(data) {
			$("#returnSelectList").html(data);
		}
	})
}

function housekeeperSelect_D(){
	var select_type = $('select  option:selected').val();
	var select_input = $('#select_input').val();
	$.ajax({
		url : 'zmkm_oa/housekeeper_manage/selectByOneUser',
		dataType : 'html',
		data : ({'select_type':select_type,
			'select_input':select_input
		}),
		success : function(data) {
			$("#Return").html(data);
		}
	})
}

function updateHousekeeper(){
	if($("#userName").val() == null || $("#userName").val() == ""){
		$("#userNameDiv").children('font').remove();
		$("#userNameDiv").append("<font color='red'>账号不能为空</font>");
		$("#userName").focus();
	}else if($("#passWord").val()==null || $("#passWord").val() == ""){
		$("#passWordDiv").children('font').remove();
		$("#passWordDiv").append("<font color='red'>密码不能为空</font>");
		$("#passWord").focus();
	}else if($("#phone").val()==null || $("#phone").val() == ""){
		$("#phoneDiv").children('font').remove();
		$("#phoneDiv").append("<font color='red'>手机号不能为空</font>");
		$("#phone").focus();
	}else if($("#housekeeper_address").val()==null || $("#housekeeper_address").val() == ""){
		$("#housekeeper_addressDiv").children('font').remove();
		$("#housekeeper_addressDiv").append("<font color='red'>办公地址不能为空</font>");
		$("#housekeeper_address").focus();
	}else if($("#name").val()==null || $("#name").val() == ""){
		$("#nameDiv").children('font').remove();
		$("#nameDiv").append("<font color='red'>姓名不能为空</font>");
		$("#name").focus();
	}else if($("#identity_card").val()==null || $("#identity_card").val() == ""){
		$("#identity_cardDiv").children('font').remove();
		$("#identity_cardDiv").append("<font color='red'>身份证不能为空</font>");
		$("#identity_card").focus();
	}else if($("#identity_address").val()==null || $("#identity_address").val() == ""){
		$("#identity_addressDiv").children('font').remove();
		$("#identity_addressDiv").append("<font color='red'>身份证地址不能为空</font>");
		$("#identity_address").focus();
	}else if($("#user_grade").val()==null || $("#user_grade").val() == ""){
		$("#user_gradeDiv").children('font').remove();
		$("#user_gradeDiv").append("<font color='red'>级别不能为空</font>");
		$("#user_grade").focus();
	}else{
		$("#selectForm").submit();
	}
}